home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / XmeAddFocusChangeCallback.z / XmeAddFocusChangeCallback
Text File  |  1998-10-30  |  9KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmeeeeAAAAddddddddFFFFooooccccuuuussssCCCChhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk((((llllUUUUXXXXiiiiNNNNmmmmbbbbIIIIeeeerrrrXXXXAAAAaaaaddddrrrrSSSSddddyyyyyyyyFFFFssssooooccccttttccccaaaaeeeeuuuullllmmmmssssllllCCCC))))VVVVhhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XXXXmmmmeeeeAAAAddddddddFFFFooooccccuuuussssCCCChhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk - Registers a callback for focus
  10.           changes
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.           #include <Xm/VendorSEP.h>
  14.  
  15.           vvvvooooiiiidddd XXXXmmmmeeeeAAAAddddddddFFFFooooccccuuuussssCCCChhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk(
  16.           WWWWiiiiddddggggeeeetttt wwwwiiiiddddggggeeeetttt,
  17.           XXXXttttCCCCaaaallllllllbbbbaaaacccckkkkPPPPrrrroooocccc ccccaaaallllllllbbbbaaaacccckkkk____pppprrrroooocccceeeedddduuuurrrreeee,
  18.           XXXXttttPPPPooooiiiinnnntttteeeerrrr ddddaaaattttaaaa);
  19.  
  20.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.           XXXXmmmmeeeeAAAAddddddddFFFFooooccccuuuussssCCCChhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk registers a _c_a_l_l_b_a_c_k__p_r_o_c_e_d_u_r_e to
  22.           be called whenever there is a focus change to any widget in
  23.           the widget tree managed by a specified VVVVeeeennnnddddoooorrrrSSSShhhheeeellllllll or
  24.           subclass of VVVVeeeennnnddddoooorrrrSSSShhhheeeellllllll. This _c_a_l_l_b_a_c_k__p_r_o_c_e_d_u_r_e is called
  25.           the focus change callback.  Motif will not call the focus
  26.           change callbacks when the VVVVeeeennnnddddoooorrrrSSSShhhheeeellllllll (or subclass) is in
  27.           implicit mode. In explicit mode, Motif automatically calls
  28.           the focus change callbacks whenever the user or the
  29.           application attempts to change focus. Your focus change
  30.           callback procedure has the option of accepting or rejecting
  31.           the attempted focus change.
  32.  
  33.           Registering a focus change callback can cause an entire
  34.           application to run more slowly because the focus change
  35.           callbacks might be called fairly frequently.
  36.  
  37.           A focus change callback can be removed by calling
  38.           XXXXmmmmeeeeRRRReeeemmmmoooovvvveeeeFFFFooooccccuuuussssCCCChhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk.
  39.  
  40.           _w_i_d_g_e_t    Specifies the widget whose children are to be
  41.                     monitored for focus changes.  The specified _w_i_d_g_e_t
  42.                     must be a VVVVeeeennnnddddoooorrrrSSSShhhheeeellllllll or a subclass of
  43.                     VVVVeeeennnnddddoooorrrrSSSShhhheeeellllllll.
  44.  
  45.           _c_a_l_l_b_a_c_k__p_r_o_c_e_d_u_r_e
  46.                     Specifies the callback procedure to be called
  47.                     whenever there is a focus change.
  48.  
  49.           _d_a_t_a      Specifies the call data to be passed as the
  50.                     _c_a_l_l__d_a_t_a argument to the callback procedure.
  51.  
  52.           Motif passes a pointer to an XXXXmmmmFFFFooooccccuuuussssMMMMoooovvvveeeeddddCCCCaaaallllllllbbbbaaaacccckkkkSSSSttttrrrruuuucccctttt to
  53.           _c_a_l_l_b_a_c_k__p_r_o_c_e_d_u_r_e. When _c_a_l_l_b_a_c_k__p_r_o_c_e_d_u_r_e returns, Motif
  54.           examines the _c_o_n_t field only.
  55.  
  56.           typedef struct {
  57.                   int     _r_e_a_s_o_n ;;;;
  58.                   XXXXEEEEvvvveeeennnntttt  ****_e_v_e_n_t;;;;
  59.                   BBBBoooooooolllleeeeaaaannnn _c_o_n_t;;;;
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmeeeeAAAAddddddddFFFFooooccccuuuussssCCCChhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk((((llllUUUUXXXXiiiiNNNNmmmmbbbbIIIIeeeerrrrXXXXAAAAaaaaddddrrrrSSSSddddyyyyyyyyFFFFssssooooccccttttccccaaaaeeeeuuuullllmmmmssssllllCCCC))))VVVVhhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk((((lllliiiibbbbrrrraaaarrrryyyy ccccaaaallllllll))))
  71.  
  72.  
  73.  
  74.                   WWWWiiiiddddggggeeeetttt _o_l_d__f_o_c_u_s;;;;
  75.                   WWWWiiiiddddggggeeeetttt _n_e_w__f_o_c_u_s;;;;
  76.                   uuuunnnnssssiiiiggggnnnneeeedddd cccchhhhaaaarrrr _f_o_c_u_s__p_o_l_i_c_y;;;;
  77.                   XXXXmmmmTTTTrrrraaaavvvveeeerrrrssssaaaallllDDDDiiiirrrreeeeccccttttiiiioooonnnn _d_i_r_e_c_t_i_o_n;;;;
  78.           }}}} XXXXmmmmFFFFooooccccuuuussssMMMMoooovvvveeeeddddCCCCaaaallllllllbbbbaaaacccckkkkSSSSttttrrrruuuucccctttt;;;;
  79.  
  80.           _r_e_a_s_o_n    Indicates why the callback was invoked. Motif
  81.                     always sets this field to XXXXmmmmCCCCRRRR____FFFFOOOOCCCCUUUUSSSS____MMMMOOOOVVVVEEEEDDDD.
  82.  
  83.           _e_v_e_n_t     Points to the event that triggered the callback.
  84.  
  85.           _c_o_n_t      Indicates whether an attempted focus change will
  86.                     be allowed or rejected.  A focus change callback
  87.                     should set _c_o_n_tto True (the default) to permit the
  88.                     focus change. A focus change callback should set
  89.                     _c_o_n_t to False to reject the focus change.
  90.                     Therefore, if you set _c_o_n_t to False, Motif will
  91.                     ensure that the focus stays at widget _o_l_d__f_o_c_u_s.
  92.  
  93.           _o_l_d__f_o_c_u_s Indicates the widget ID of the widget that had
  94.                     keyboard focus immediately prior to the most
  95.                     recent traversal.
  96.  
  97.           _n_e_w__f_o_c_u_s Indicates the widget ID of the widget that has
  98.                     just gotten keyboard focus.
  99.  
  100.           _f_o_c_u_s__p_o_l_i_c_y
  101.                     Indicates the VVVVeeeennnnddddoooorrrrSSSShhhheeeellllllll's keyboard focus policy;
  102.                     this will always be XXXXmmmmEEEEXXXXPPPPLLLLIIIICCCCIIIITTTT since
  103.                     _c_a_l_l_b_a_c_k__p_r_o_c_e_d_u_r_e only gets called in explicit
  104.                     mode.
  105.  
  106.           _d_i_r_e_c_t_i_o_n Specifies the direction of the traversal. (See
  107.                     XXXXmmmmPPPPrrrroooocccceeeessssssssTTTTrrrraaaavvvveeeerrrrssssaaaallll(3) in the _M_o_t_i_f _P_r_o_g_r_a_m_m_e_r'_s
  108.                     _R_e_f_e_r_e_n_c_efor details on possible values of the
  109.                     XXXXmmmmTTTTrrrraaaavvvveeeerrrrssssaaaallllDDDDiiiirrrreeeeccccttttiiiioooonnnn enumerated type.)
  110.  
  111.      RRRREEEELLLLAAAATTTTEEEEDDDD
  112.           XXXXmmmmeeeeRRRReeeemmmmoooovvvveeeeFFFFooooccccuuuussssCCCChhhhaaaannnnggggeeeeCCCCaaaallllllllbbbbaaaacccckkkk(3).
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.